package com.ebupt.migu.music.messageCenter.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Intellij IDEA.
 * User:  liuyangyang@cd.ebupt.com
 * Date:  2020/3/9
 */
@Mapper
@DS("mysql_mg")
public interface MessageCenterMapper {

    /**
     * 添加通知类型
     *
     * @param params
     */
    void addNoticeType(Map<String, Object> params);

    /**
     * 查询当前昵称是否存在
     *
     * @return
     */
//    boolean isNickNameExist(String nickName);
    boolean isNickNameExist(Map<String, Object> map);

    /**
     * 查询除此之外是否有昵称重复
     *
     * @return
     */
//    boolean isNickNameExistExceptID(String nickName, int id);
    boolean isNickNameExistExceptID(Map<String, Object> map);

    /**
     * 更新通知类型信息
     *
     * @param params
     */
    void updateNoticeType(Map<String, Object> params);

    /**
     * 条件查询通知类型总数
     *
     * @param params
     * @return
     */
    Integer queryNoticeCount(Map<String, Object> params);

    /**
     * 查询消息通知列表
     *
     * @param params
     * @return
     */
    List<HashMap<String, Object>> queryNoticeList(Map<String, Object> params);
}
